﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<td valign="top" style="width:250px;">

<% 
    MySkiPatrolSite.AdminSvc.Patrol patrol = null;
    bool showCalendar = false;
    bool showWeather = false;
    
    if (Session["PATROL"] != null) { patrol = (MySkiPatrolSite.AdminSvc.Patrol)Session["PATROL"];  };

    if (patrol != null)
    {
        if (patrol.ApplicationSettings != null)
        {
            foreach (MySkiPatrolSite.AdminSvc.AppSetting setting in patrol.ApplicationSettings)
            {
                if ((setting.Name.ToUpper() == "WEBCALENDARRIBBONENABLED") && (Boolean.Parse(setting.Value) == true)) 
                {
                    showCalendar = true;
                    
                }

                if ((setting.Name.ToUpper() == "WEBWEATHERRIBBONENABLED") && (Boolean.Parse(setting.Value) == true))
                {
                    showWeather = true;
                    
                }
            }
        }
    }

    if (showCalendar){
        %><div style="padding-bottom:10px;">
        <% Html.RenderPartial("CalendarRibbon"); %>
        
        </div>
    <% } 

    if (showWeather)
    {
        %><div style="padding-bottom:10px;">
        <% Html.RenderPartial("WeatherRibbon"); %>
        
        </div>
    <% }
 
     %>




              




               
               
             
               
 
             
             </td>
